cmake_minimum_required(VERSION 2.8)
project(fddsocks5)
set(CMAKE_INSTALL_PREFIX /usr/local)
set(CMAKE_MACOSX_RPATH 0)
#if(USE_32BITS)
#message(STATUS "using 32bits")
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
#else()
#endif(USE_32BITS)

if (CMAKE_BUILD_TYPE STREQUAL Debug)
message(STATUS "***********************************")
message(STATUS "We are going to build debug version!")
message(STATUS "***********************************")
endif()

set(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g -rdynamic -ggdb -Wno-sign-compare")
set(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall -rdynamic -Wno-sign-compare")
#set(CMAKE_SKIP_BUILD_RPATH TRUE)
#set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
#set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
#set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
add_subdirectory(sockssrv ssrv)
